package ynu.edu.achitecturework.dto;

import lombok.Data;

@Data
public class LoginResponse {
    private String token;
    private String username;
    private String roles;
    private Long userId;

    public static LoginResponse of(String token, String username, String roles, Long userId) {
        LoginResponse response = new LoginResponse();
        response.setToken(token);
        response.setUsername(username);
        response.setRoles(roles);
        response.setUserId(userId);
        return response;
    }
}